var user = getUserInfo();

if(!user){
    window.confirm("没有登录, 不允许进来");
}

var vue = new Vue({
    el:"#app",
    data:{
        owner:{},
        visitors:[],
        totalView:0,
        todayView:0
    },
    methods:{

    },
    filters:{

    },
    mounted:function () {
        var param = getParams();
        //查询指定id用户对象, 如果没有自己写接口, id是用户id(不一定是当前用户)
        ajaxGet("/users/get",{id:param.ownerId}, function (data) {
            vue.owner = data.data;
        });
        ajaxGet("/users/visitors",{id:param.ownerId},function (data) {
            vue.visitors=data.data.personalVO.visitUsers;
            vue.totalView=data.data.personalVO.totalVisitNum;
            vue.todayView=data.data.todayVisitNum;
        })
    }
});

